<?php

namespace App\Http\Controllers\api;

use App\Http\Controllers\Controller;
use App\Http\Repository\InformationRepository;
use Illuminate\Http\Request;

class InformationController extends Controller
{
    //资讯接口
    public function informatonShow()
    {
       return InformationRepository::informatonShow();
    }
    /**
     * @param Request $request
     * @return false|string
     * Su ang
     * 资讯详情接口
     */
    public function listIndex(Request $request)
    {
        $id = $request->get('id');
        if (empty($id) && !is_numeric($id)){
            return 'id错误';
        }
       $data = InformationRepository::listIndex($id);
        return $data;

    }
}
